<?php

namespace app\validate;

use think\Validate;

class User extends Validate
{
    protected $rule = [
        'username' => 'require',
        'password' => 'require',
        'nickname' => 'require',
    ];

    protected $message = [
        'name.require' => '用户名必须',
        'password' => '密码必填',
        'nickname' => '昵称必填',
    ];

    protected $scene = [
        'login' => ['username', 'password'],
        'register' => ['username', 'password', 'nickname'],
    ];
}